<?php
/**
 * Handles user login, logout, and registration functions for the site.
 * Will include activation, forgot password, and other user management functions
 * in the future.
 *
 * @author Chris Lunsford
 */
class Site extends Controller {
	
	/**
	 * Class constructor
	 */
	function __construct() {
		parent::__construct();
		
		$this->load->library('BadgerController');	
	}
	
	function index() {
		$this->load->view('static');
	}
	
	/**
	 * These functions deactivated for static site
	 *
	 
	 * Attempts a login for the current user, if the login is unsuccessful the login form is displayed.
		
	function login() {
		$this->badgercontroller->login();
		$data['input_username'] = array('name' => 'username', 'size' => '20');
		$data['input_password'] = array('name' => 'password', 'size' => '20');
		$this->load->view('login', $data);
	}
	
	/**
	 * Logs out the current user.
	
	function logout() {
		$this->badgercontroller->logout();
		redirect('');
	}
	
	/**
	 * Submits a registration form for the current user, if the
	 * registration is unsuccessful, the registration form is displayed.
	
	function register() {
		redirect('');
		//$this->badgercontroller->register();
		//$this->load->view('register');
	}
	
	/**
	 * Loads signup page for XAcms beta
	 
	function signup() {
		$this->load->view('signup');
	}
	*/
}
?>